sdresourcebsdfmeasurement module

class sd.api.sdresourcebsdfmeasurement.SDResourceBSDFMeasurement(APIContext, handle, *args, **kwargs)

Bases: sd.api.sdresource.SDResource

A BSDF measurement resource as it can be found in a SDPackage

delete() → None

Delete the SDResource.

deleteProperty(sdProperty: sd.api.sdproperty.SDProperty) → None

Delete the specified SDProperty

Parameters

sdProperty – The property to delete

getAnnotationPropertyValueFromId(sdPropertyId: str) → Optional[sd.api.sdvalue.SDValue]

Get the value of the annotation property that matches the specified identifier

Parameters

sdPropertyId – The identifier of the annotation property we want to retrieve

getClassName() → str

Returns the most specific name of the class this APIObject is

getEmbedMethod() → sd.api.sdresource.EmbedMethod

Get the method used by this resource to reference its content or file (See EmbedMethod enum)

getFilePath() → str

Get the path of the file used by this resource

getIdentifier() → str

Get the resource identifier as string

getInputPropertyValueFromId(sdPropertyId: str) → Optional[sd.api.sdvalue.SDValue]

Get the value of the input property that matches the specified identifier

Parameters

sdPropertyId – The identifier of the input property we want to retrieve

getMetadataDict() → Optional[sd.api.sdmetadatadict.SDMetadataDict]

Get the metadata of this resource as a SDMetadataDict.

getPackage() → SDPackage

Get the SDPackage the current SDResource belongs to.

getProperties(sdPropertyCategory: sd.api.sdproperty.SDPropertyCategory) → sd.api.sdarray.SDArray[sd.api.sdproperty.SDProperty][sd.api.sdproperty.SDProperty]

Get all properties of the specified category (Input, Output or Annotation)

Parameters

sdPropertyCategory – The enum value the indicate which type of properties to get

getPropertyAnnotationValueFromId(sdProperty: sd.api.sdproperty.SDProperty, sdPropertyAnnotationId: str) → Optional[sd.api.sdvalue.SDValue]

Get the property annotation value of the specified property

Parameters
  • sdProperty – The property we want to retrieve the annotation value from

  • sdPropertyAnnotationId – The identifier of the annotation to retrieve

getPropertyAnnotations(sdProperty: sd.api.sdproperty.SDProperty) → sd.api.sdarray.SDArray[sd.api.sdproperty.SDProperty][sd.api.sdproperty.SDProperty]

Get the annotation properties of the specified property

Parameters

sdProperty – The SDProperty to retrieve the annotations from

getPropertyFromId(sdPropertyId: str, sdPropertyCategory: sd.api.sdproperty.SDPropertyCategory) → Optional[sd.api.sdproperty.SDProperty]

Get property that match the specified identifier in the specified category

Parameters
  • sdPropertyId – The identifier of the property we want to retrieve

  • sdPropertyCategory – The category of the property

getPropertyMetadataDictFromId(sdPropertyId: str, sdPropertyCategory: sd.api.sdproperty.SDPropertyCategory) → Optional[sd.api.sdmetadatadict.SDMetadataDict]

Get the metadata of the property that matches the specified identifier in the specified category as a SDMetadataDict.

Parameters
  • sdPropertyId – The identifier of the property we want to retrieve

  • sdPropertyCategory – The category of the property

getPropertyValue(sdProperty: sd.api.sdproperty.SDProperty) → Optional[sd.api.sdvalue.SDValue]

Get the value of a property

Parameters

sdProperty – The property we want to retrieve the value from

getPropertyValueFromId(sdPropertyId: str, sdPropertyCategory: sd.api.sdproperty.SDPropertyCategory) → Optional[sd.api.sdvalue.SDValue]

Get the value of the property that matches the specified identifier in the specified category

Parameters
  • sdPropertyId – The identifier of the property we want to retrieve

  • sdPropertyCategory – The category of the property

getType() → Optional[sd.api.sdtype.SDType]

Get the resource type as SDType

getUrl() → str

Retrieve the resource URL

newProperty(sdPropertyId: str, sdPropertyType: sd.api.sdtype.SDType, sdPropertyCategory: sd.api.sdproperty.SDPropertyCategory) → Optional[sd.api.sdproperty.SDProperty]

Create a new SDProperty of the specified type and in the specified SDPropertyCategory

Parameters
  • sdPropertyId – The identifier of the new property

  • sdPropertyType – The type of the new property

  • sdPropertyCategory – The SDPropertyCategory of the new property to create

release() → None

Releases an APIObject

static sNewFromFile(parent: sd.api.sdapiobject.SDAPIObject, filePath: str, embedMethod: sd.api.sdresource.EmbedMethod) → sd.api.sdresourcebsdfmeasurement.SDResourceBSDFMeasurement

Create a new SDResourceBSDFMeasurement from the specified file. The resource may reference or copy the file content depending on the EmbedMethod

Parameters
  • parent – The parent data that will contains the newly created Resource. Can be SDPackage or SDResourceFolder

  • filePath – The bitmap file path

  • embedMethod – The embed method

setAnnotationPropertyValueFromId(sdAnnotationPropertyId: str, sdValue: sd.api.sdvalue.SDValue) → None

Set the value of the specified annotation property retrieved by his identifier

Parameters
  • sdAnnotationPropertyId – The identifier of the annotation property

  • sdValue – The value to set

setIdentifier(identifier: str) → None

Set the resource identifier

Parameters

identifier – The new resource identifier

setInputPropertyValueFromId(sdInputPropertyId: str, sdValue: sd.api.sdvalue.SDValue) → None

Set the value of the specified input property retrieved by his identifier

Parameters
  • sdInputPropertyId – The identifier of the input property

  • sdValue – The value to set

setPropertyAnnotationValueFromId(sdProperty: sd.api.sdproperty.SDProperty, sdPropertyAnnotationId: str, sdValue: sd.api.sdvalue.SDValue) → None

Set the property annotation value of the specified property

Parameters
  • sdProperty – The property whose we want to change the annotation value

  • sdPropertyAnnotationId – The identifier of the annotation to set

  • sdValue – The SDValue to set

setPropertyValue(sdProperty: sd.api.sdproperty.SDProperty, sdValue: sd.api.sdvalue.SDValue) → None

Set the value of the specified property

Parameters
  • sdProperty – The property we want to retrieve the value from

  • sdValue – The value to set